/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ins.entity;

import org.hibernate.validator.constraints.Length;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 检验报告书-日志Entity
 * @author fanqinglong
 * @version 2017-12-25
 */
public class InsLog extends DataEntity<InsLog> {
	
	private static final long serialVersionUID = 1L;
	private String module;		// 操作的模块（数据表，数据）
	private String type;		// 操作类型
	private InsTable table;		// 数据表id
	private String moduleid;		// 模块的ID
	private String data;		// 数据
	private String index;       // 索引
	
	private String dateFrom;    // 日期起始
	private String dateTo;      // 日期结束
	
	//数据表
	public static final String MODULE_TABLE = "1";
	//数据
	public static final String MODULE_DATA = "2";
	
	//修改:数据表和数据共用
	public static final String TYPE_SAVE = "1";
	//删除
	public static final String TYPE_DELETE = "2";
	//打印
	public static final String TYPE_PRINT = "3";
	//绑定模板
	public static final String TYPE_BIND = "4";
	//解绑模板
	public static final String TYPE_UNBIND = "5";
	//创建:指数据表的创建
	public static final String TYPE_CREATE = "6";
	//填报:指数据填报
	public static final String TYPE_WRITE = "7";
	//给数据表分配人员
	public static final String TYPE_ASSIGN_USER = "8";
	//将人员移除数据表
	public static final String TYPE_OUT_TABLE = "9";
	//给数据表分配权限
	public static final String TYPE_ASSIGN_AUTH = "10";
	
	public InsLog() {
		super();
	}

	public InsLog(String id){
		super(id);
	}
	public InsLog(String module,String type,InsTable table,String moduleid,String data){
		this.module = module;
		this.type = type;
		this.setTable(table);
		this.moduleid = moduleid;
		this.data = data;
	}

	@Length(min=0, max=64, message="操作的模块（数据表，数据）长度必须介于 0 和 64 之间")
	public String getModule() {
		return module;
	}

	public void setModule(String module) {
		this.module = module;
	}
	
	@Length(min=0, max=10, message="操作类型长度必须介于 0 和 10 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@Length(min=0, max=64, message="模块的ID长度必须介于 0 和 64 之间")
	public String getModuleid() {
		return moduleid;
	}

	public void setModuleid(String moduleid) {
		this.moduleid = moduleid;
	}
	
	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	public InsTable getTable() {
		return table;
	}

	public void setTable(InsTable table) {
		this.table = table;
	}

	public String getIndex() {
		return index;
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public String getDateFrom() {
		return dateFrom;
	}

	public void setDateFrom(String dateFrom) {
		this.dateFrom = dateFrom;
	}

	public String getDateTo() {
		return dateTo;
	}

	public void setDateTo(String dateTo) {
		this.dateTo = dateTo;
	}
	
}